/**
 * 
 */
package org.jenkon.io.filter;

import java.io.File;
import java.util.Date;

import org.jenkon.io.utils.FileUtils;

/**
 * {@link FileFilter} implementation to filter last modified date of file.
 * 
 * @author Jens Konopka
 * 
 */
public class MinLastModifiedFileFilter extends AbstractLastModifiedFileFilter {

	/**
	 * 
	 */
	private static final long serialVersionUID = -260841161545381555L;

	/**
	 * @param millis Milliseconds
	 */
	public MinLastModifiedFileFilter(final long millis) {
		super(millis);
	}

	/**
	 * @param date {@link Date}
	 */
	public MinLastModifiedFileFilter(final Date date) {
		super(date);
	}

	/**
	 * @param reference {@link File}
	 */
	public MinLastModifiedFileFilter(final File reference) {
		super(reference);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.io.FileFilter#accept(java.io.File)
	 */
	public boolean accept(final File pathname) {
		return FileUtils.isFileNewer(pathname, getMillis());
	}

}
